{include file='header.tpl'}
<script type="text/javascript" src="/js/articlePreview.js"></script>
<form method="post" action="{geturl action='setstatus'}" id='status'>
    <div class="preview">
    <input type="hidden" name="id" value="{$article->getId()}" />
    {if $article->isLive()}
        <div id="livestauts">这篇文章已经发布，想改变为草稿状态，点击<strong>取消发布</strong></div>
        <div>
            <input type="submit" class="submit" value="取消发布" 
                name="unpublish" id="statusunpublish" />
            <input type="submit" class="submit" value="编辑" 
                name="edit" id="statusedit" />
            <input type="submit" class="submit" value="删除" 
                name="delete" id="statusdelete" />
        </div>
    {else}
           <div id="draftstatus"> 这篇文章还没有发布，想要发布文章，点击<strong>发布</strong></div>
           <div>
               <input class="submit" type="submit" value="发布" 
                    name="publish" id="statuspublish" />
               <input class="submit" type="submit" value="编辑" 
                    name="edit" id="statusedit" />
               <input class="submit" type="submit" value="删除" 
                    name="delete" id="statusdelete" />
           </div>
    {/if}
</div>
</form>
<div class="date">
    {$article->dateline|date_format:'%x %X'}
</div>
<div class="text">
    {$article->content}
</div>
{include file='footer.tpl'}